import request from '@/utils/request'

 //API常量
 const APIS = {
  V1: "/v1"
}

export function findByProjectId(params) {
  return request({
    url: APIS.V1+`/system/credit/findByProjectId`,
    method: 'get',
    params:params
  })
}
export function findByProjectIdNew(params) {
  return request({
    url: APIS.V1+`/system/project/credit/findByProjectId`,
    method: 'get',
    params:params
  })
}

export function addCredit(data) {
  return request({
    url: APIS.V1+`/system/credit/add`,
    method: 'post',
    data
  })
}


export function addCreditNew(data) {
  return request({
    url: APIS.V1+`/system/project/credit/saveOrUpdate`,
    method: 'post',
    data
  })
}


export function deleteCredit(data) {
  return request({
    url: APIS.V1+`/system/project/credit/overdue`,
    method: 'DELETE',
    params:data
  })
}

export function exportCredit(params) {
  return request({
    url: APIS.V1+`/system/project/credit/export`,
    method: 'get',
    params:params
  })
}
